#@layout()
#define main()
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title  am-cf">角色管理</div>
                </div>
                <div class="widget-body  am-fr">
                    <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                        <div class="am-form-group">
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                    <a class="am-btn am-btn-default am-btn-success" href="/admin/role/add"><span class="am-icon-plus"></span> 新增</a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-3" style="float:right">
                        <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                            <input type="text" class="am-form-field ">
                            <span class="am-input-group-btn">
                                <button class="am-btn  am-btn-default am-btn-success tpl-table-list-field am-icon-search" type="button"></button>
                            </span>
                        </div>
                    </div>

                    <div class="am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black " id="example-r">
                            <thead>
                            <tr>
                                <th>角色名</th>
                                <th>排序</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            #for(x : rolePage.getList())
                            <tr class="gradeX">
                                <td>#(x.name)</td>
                                <td>#(x.sort)</td>
                                <td>
                                    <div class="tpl-table-black-operation">
                                        #ifHasAuth("/admin/role/update")
                                            <a href="/admin/role/edit/#(x.id)">
                                                <i class="am-icon-pencil"></i> 编辑
                                            </a>
                                        #end
                                        #ifHasAuth("/admin/role/delete")
                                            #if(x.id != 1)
                                                <a href="/admin/role/delete/#(x.id)" class="tpl-table-black-operation-del">
                                                    <i class="am-icon-trash"></i> 删除
                                                </a>
                                            #end
                                        #end
                                    </div>
                                </td>
                            </tr>
                            #end
                            </tbody>
                        </table>
                    </div>
                    #@paginate(rolePage.pageNumber, rolePage.totalPage, "/admin/role/")
                </div>
            </div>
        </div>
    </div>
</div>
#end